import request from '@/router/axios'

export function queryPage (param) {
  return request({
    url: '/sys/api/v1/sysApp/page',
    method: 'post',
    data: param
  })
}

export function create (param) {
  return request({
    url: '/sys/api/v1/sysApp',
    method: 'post',
    headers: { 'content-type': 'multipart/form-data' },
    data: param
  })
}

export function modify (param) {
  return request({
    url: '/sys/api/v1/sysApp',
    method: 'put',
    data: param
  })
}

export function delObj(row) {
  return request({
    url: '/sys/api/v1/sysApp/' + row.id,
    method: 'delete'
  })
}

/**
 * 上下线
 * @param row
 * @returns request
 */
export function putStatus(row) {
  return request({
    url: '/sys/api/v1/sysApp/' + row.id + '/' + row.appStatus,
    method: 'put'
  })
}

